import { Controller } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { Crud } from '@nestjsx/crud';
import { GoodsAttribute } from '../../entities/goods_attribute.entity';
import { GoodsAttributeService } from '../../services/goods-attribute/goods-attribute.service';

@Crud({
  model:{
    type:GoodsAttribute
  },
  query:{
    join:{
      attribute:{
        exclude:["id","attribute_category_id","input_type","sort_order","value"],
        eager:true
      }
    },
    exclude:["id","attribute_id","goods_id"]
  }
})
@ApiTags('goods-attribute')
@Controller('api/goods-attribute')
export class GoodsAttributeController {
  constructor(
    public readonly service: GoodsAttributeService
  ){}
}
